/*
 * Copyright (c) 2005, 2014 vacoor
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.vacoor.nothing.demo.jms;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created on 3/24/14.
 *
 * @author vacoor
 */
public class NotifyMessageListener implements MessageListener {
    private static final Logger LOG = LoggerFactory.getLogger(NotifyMessageListener.class);

    @Override
    public void onMessage(Message message) {
        TextMessage msg = (TextMessage) message;
        try {
            LOG.info("jms: {}", msg.getText());
            LOG.info("中文");
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }

}
